cmake_minimum_required(VERSION 3.29)
project(opencvDemo)

# 路径根据opencv实际安装情况调整
# Windows
#set(OpenCV_DIR "F:/jacob/Documents/OpenCV/opencv/mingw64_build/install")
# Mac OS
set(OpenCV_DIR "/Users/jacob/Applications/opencv-5.0.0-alpha/bin")

message(STATUS "OpenCV versions: ${OpenCV_VERSION}")
message(STATUS "OpenCV include: ${OpenCV_INCLUDE_DIRS}")
message(STATUS "OpenCV libraries: ${OpenCV_LIBS}")

message(STATUS "project source dir ${PROJECT_SOURCE_DIR}")
message(STATUS "project binary dir ${PROJECT_BINARY_DIR}")

find_package(OpenCV REQUIRED)

include_directories(${OpenCV_INCLUDE_DIRS})

set(SOURCE_LIST src/main.cpp)

add_executable(${PROJECT_NAME} ${SOURCE_LIST})

target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
